package io.kiki.sba.registry.server.clientInterface.store;

import io.kiki.sba.registry.common.model.Tuple;
import io.kiki.sba.registry.common.model.store.Watcher;


public class WatchersImpl extends AbstractDataManager<Watcher> implements Watchers {

    private final Store<Watcher> store = new _store_<>(1024 * 16, 32);

    public WatchersImpl() {
        super();
    }

    @Override
    public boolean add(Watcher watcher) {
        Watcher.internWatcher(watcher);
        Tuple<Watcher, Boolean> ret = addData(watcher);
        return ret.o2;
    }

    @Override
    protected Store<Watcher> getSlotStore() {
        return store;
    }
}
